3.141 \(\int \frac{\sec (c+d x)}{\sqrt{a-a \sec (c+d x)}} \, dx\)

Optimal. Leaf size=48 \[ -\frac{\sqrt{2} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a-a \sec (c+d x)}}\right )}{\sqrt{a} d} \]

[Out]

-((Sqrt[2]*ArcTan[(Sqrt[a]*Tan[c + d*x])/(Sqrt[2]*Sqrt[a - a*Sec[c + d*x]])])/(Sqrt[a]*d))

________________________________________________________________________________________

Rubi [A]  time = 0.0380545, antiderivative size = 48, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {3795, 203} \[ -\frac{\sqrt{2} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a-a \sec (c+d x)}}\right )}{\sqrt{a} d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]/Sqrt[a - a*Sec[c + d*x]],x]

[Out]

-((Sqrt[2]*ArcTan[(Sqrt[a]*Tan[c + d*x])/(Sqrt[2]*Sqrt[a - a*Sec[c + d*x]])])/(Sqrt[a]*d))

Rule 3795

Int[csc[(e_.) + (f_.)*(x_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[-2/f, Subst[Int[1/(2
*a + x^2), x], x, (b*Cot[e + f*x])/Sqrt[a + b*Csc[e + f*x]]], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0
]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\sec (c+d x)}{\sqrt{a-a \sec (c+d x)}} \, dx &=-\frac{2 \operatorname{Subst}\left (\int \frac{1}{2 a+x^2} \, dx,x,\frac{a \tan (c+d x)}{\sqrt{a-a \sec (c+d x)}}\right )}{d}\\ &=-\frac{\sqrt{2} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a-a \sec (c+d x)}}\right )}{\sqrt{a} d}\\ \end{align*}

Mathematica [C]  time = 0.382189, size = 94, normalized size = 1.96 \[ \frac{i \sqrt{2} \left (-1+e^{i (c+d x)}\right ) \tanh ^{-1}\left (\frac{1+e^{i (c+d x)}}{\sqrt{2} \sqrt{1+e^{2 i (c+d x)}}}\right )}{d \sqrt{1+e^{2 i (c+d x)}} \sqrt{a-a \sec (c+d x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]/Sqrt[a - a*Sec[c + d*x]],x]

[Out]

(I*Sqrt[2]*(-1 + E^(I*(c + d*x)))*ArcTanh[(1 + E^(I*(c + d*x)))/(Sqrt[2]*Sqrt[1 + E^((2*I)*(c + d*x))])])/(d*S
qrt[1 + E^((2*I)*(c + d*x))]*Sqrt[a - a*Sec[c + d*x]])

________________________________________________________________________________________

Maple [B]  time = 0.135, size = 83, normalized size = 1.7 \begin{align*} -2\,{\frac{-1+\cos \left ( dx+c \right ) }{d\sin \left ( dx+c \right ) }\arctan \left ({\frac{1}{\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}}} \right ){\frac{1}{\sqrt{{\frac{a \left ( -1+\cos \left ( dx+c \right ) \right ) }{\cos \left ( dx+c \right ) }}}}}{\frac{1}{\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)/(a-a*sec(d*x+c))^(1/2),x)

[Out]

-2/d*(-1+cos(d*x+c))*arctan(1/(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2))/(a*(-1+cos(d*x+c))/cos(d*x+c))^(1/2)/sin(d
*x+c)/(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec \left (d x + c\right )}{\sqrt{-a \sec \left (d x + c\right ) + a}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a-a*sec(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

integrate(sec(d*x + c)/sqrt(-a*sec(d*x + c) + a), x)

________________________________________________________________________________________

Fricas [A]  time = 1.95033, size = 424, normalized size = 8.83 \begin{align*} \left [\frac{\sqrt{2} \sqrt{-\frac{1}{a}} \log \left (-\frac{2 \, \sqrt{2}{\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt{\frac{a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} \sqrt{-\frac{1}{a}} -{\left (3 \, \cos \left (d x + c\right ) + 1\right )} \sin \left (d x + c\right )}{{\left (\cos \left (d x + c\right ) - 1\right )} \sin \left (d x + c\right )}\right )}{2 \, d}, \frac{\sqrt{2} \arctan \left (\frac{\sqrt{2} \sqrt{\frac{a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt{a} \sin \left (d x + c\right )}\right )}{\sqrt{a} d}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a-a*sec(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

[1/2*sqrt(2)*sqrt(-1/a)*log(-(2*sqrt(2)*(cos(d*x + c)^2 + cos(d*x + c))*sqrt((a*cos(d*x + c) - a)/cos(d*x + c)
)*sqrt(-1/a) - (3*cos(d*x + c) + 1)*sin(d*x + c))/((cos(d*x + c) - 1)*sin(d*x + c)))/d, sqrt(2)*arctan(sqrt(2)
*sqrt((a*cos(d*x + c) - a)/cos(d*x + c))*cos(d*x + c)/(sqrt(a)*sin(d*x + c)))/(sqrt(a)*d)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec{\left (c + d x \right )}}{\sqrt{- a \left (\sec{\left (c + d x \right )} - 1\right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a-a*sec(d*x+c))**(1/2),x)

[Out]

Integral(sec(c + d*x)/sqrt(-a*(sec(c + d*x) - 1)), x)

________________________________________________________________________________________

Giac [C]  time = 1.91456, size = 109, normalized size = 2.27 \begin{align*} -\frac{\sqrt{2}{\left (\frac{\arctan \left (-i\right ) \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}{\sqrt{a}} + \frac{\arctan \left (\frac{\sqrt{a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - a}}{\sqrt{a}}\right )}{\sqrt{a} \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right ) \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}\right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a-a*sec(d*x+c))^(1/2),x, algorithm="giac")

[Out]

-sqrt(2)*(arctan(-I)*sgn(tan(1/2*d*x + 1/2*c))/sqrt(a) + arctan(sqrt(a*tan(1/2*d*x + 1/2*c)^2 - a)/sqrt(a))/(s
qrt(a)*sgn(tan(1/2*d*x + 1/2*c)^2 - 1)*sgn(tan(1/2*d*x + 1/2*c))))/d